3.1552 \(\int \frac{a+\frac{b}{x}}{x^2} \, dx\)

Optimal. Leaf size=15 \[ -\frac{a}{x}-\frac{b}{2 x^2} \]

[Out]

-b/(2*x^2) - a/x

_______________________________________________________________________________________

Rubi [A]  time = 0.013566, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ -\frac{a}{x}-\frac{b}{2 x^2} \]

Antiderivative was successfully verified.

[In]  Int[(a + b/x)/x^2,x]

[Out]

-b/(2*x^2) - a/x

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 2.94925, size = 10, normalized size = 0.67 \[ - \frac{a}{x} - \frac{b}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b/x)/x**2,x)

[Out]

-a/x - b/(2*x**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0027125, size = 15, normalized size = 1. \[ -\frac{a}{x}-\frac{b}{2 x^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b/x)/x^2,x]

[Out]

-b/(2*x^2) - a/x

_______________________________________________________________________________________

Maple [A]  time = 0.005, size = 14, normalized size = 0.9 \[ -{\frac{b}{2\,{x}^{2}}}-{\frac{a}{x}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b/x)/x^2,x)

[Out]

-1/2*b/x^2-a/x

_______________________________________________________________________________________

Maxima [A]  time = 1.41854, size = 19, normalized size = 1.27 \[ -\frac{{\left (a + \frac{b}{x}\right )}^{2}}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)/x^2,x, algorithm="maxima")

[Out]

-1/2*(a + b/x)^2/b

_______________________________________________________________________________________

Fricas [A]  time = 0.211759, size = 15, normalized size = 1. \[ -\frac{2 \, a x + b}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)/x^2,x, algorithm="fricas")

[Out]

-1/2*(2*a*x + b)/x^2

_______________________________________________________________________________________

Sympy [A]  time = 1.02543, size = 12, normalized size = 0.8 \[ - \frac{2 a x + b}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b/x)/x**2,x)

[Out]

-(2*a*x + b)/(2*x**2)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.229615, size = 18, normalized size = 1.2 \[ -\frac{a}{x} - \frac{b}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)/x^2,x, algorithm="giac")

[Out]

-a/x - 1/2*b/x^2